<template>
  <div style="display:flex;justify-content:space-around">
    <div><el-avatar size="large" :src="photo" /></div>
    <div style="display:flex;flex-direction:column;text-align:left">
        <span>科室电话:{{doc.map.dept.phone}}</span>
        <span>科室地址:{{doc.map.dept.loc}}</span>
        <span>科室名称:{{doc.map.dept.name}}</span>
    </div>
   <div style="width:50%"> {{doc.docdesc}}</div>
   </div>
</template>

<script>

export default{
    inject:["global"],
    props:{
      empno:String
    },
    data() {
        return {
            photo:""
            ,doc:{map:{dept:{}}}
        }
    },
    created:function(){
       const axios=this.global.axios;
       
       axios.get("http://192.168.2.5:9000/hp/doc/findbyempno?empno="+this.empno)
       .then(resp=>{
           this.doc=resp.data.obj;  
           this.photo='http://localhost:9999/imgs/doc/'+this.doc.photo;   
       })
    },
    methods:{
        onBack:function() {
          notify('Back')
        }
    }
}

</script>


